<template>
  <router-view></router-view>
</template>
<script setup>
onMounted(() => {
  if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
    handleFontSize();
  } else {
    if (document.addEventListener) {
      document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
    } else if (document.attachEvent) {
      document.attachEvent("WeixinJSBridgeReady", handleFontSize);
      document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
    }
  }
});
const handleFontSize = () => {
  // 设置网页字体为默认大小
  WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize': 0 });
  // 重写设置网页字体大小的事件
  WeixinJSBridge.on('menu:setfont', function () {
    WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize': 0 });
  });
}
</script>

<style lang="scss">
@import "./assets/style/normalizeReset.css";

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  color: #344054;
  overflow: auto;
  height: 100dvh;
}

#app::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  color: transparent;
}

iframe {
  border: 0;
}
</style>
